﻿<?php
if(!defined('IN_PHPSCUP'))exit('hacking'); 
class HtmlModel extends BaseModel
{

    var $table  = 'content';	

    function allhtml($v='',$startid=0,$endid=0,$num=0,$order='id desc')
    {
		
		 $v = intval($v);
		 if($endid==0&&$startid!=0)
		 {
		  $endid=$startid+30;
		 }

         if($num==0)
		 {
		 $num=30;
		 }
		 
   	     $conditions = " user_id >0 ";

		 if($startid!=0)
		 {
         $conditions .= "and id>$startid";
		 }
	     if($endid!=0)
		 {
   	     $conditions .= " and id<$endid ";		 
		 }

       
 

		 
		  
	     $table = $this->_prefix.'content_'.$v.'';
	  
		 $info = $this->S_Sql_Exe(array('table'=>"{$table}",'fields'=> ' id ','conditions' =>"{$conditions}",'limit' =>"0,{$num}", 'order' =>"{$order}"));
    
		 return $info;
   
    }
	


}




?>